/*!
  @file io.h
  @brief 
  @author Kyohei Otsu <kyon@ac.jaxa.jp>
  @date April, 2013
*/

#ifndef _IO_H_
#define _IO_H_

#include <cstdlib>
#include <iostream>

//-- debug messages
// define the macro MODULE_NAME before including this file
#define INFO(...) \
  std::cout << "[INFO:" << MODULE_NAME << "]"; \
  do { std::cout << "  " << __VA_ARGS__; } while(0); std::cout << std::endl

#define WARN(...) \
  std::cout << "[WARN:" << MODULE_NAME << "]"; \
  do { std::cout << "  " << __VA_ARGS__; } while(0); std::cout << std::endl
#define ERROR(...) \
  std::cout << "[ERROR:" << MODULE_NAME << "]"; \
  do { std::cout << "  " << __VA_ARGS__; } while(0); std::cout << std::endl

//-- for abnormal termination
#define ABORT abort

#endif
    //ros::console::print( log4cxx::Level::INFO, __FILE__, __LINE__, __VA_ARGS__); 

